/**
 * @file: device.h
 * @brief: 底层的函数和数据结构
 * @author: liaowx
 * @date: 2019.07.30
 */

#ifndef __DEVICE_H
#define __DEVICE_H

#include "ioctl.h"

#define BUCKET_SIZE_PROPORTION  (10)

enum sort_error {
	NONE_ERR = 0,
	EMPTY_POINTER_ERR,
	CMD_OVERSTEP_ERR,
	BUCKET_MALLOC_ERR,
};

struct sort {
    int cmd;
    int size;
    struct core *core[SORT_NUM];
};

extern int sort_bucket(const int src_size);
extern int sort_bubble(const int src_size);
extern struct core *get_dev(void);

#endif